package com.henry.dicesim;

public class DiceGame {
    public static void flipTwice(Dice dice) {
        dice.flip();
        int firstFlip = dice.getReading();
        dice.flip();
        int secondFlip = dice.getReading();
        System.out.println("The first die comes up " + firstFlip);
        System.out.println("The second die comes up " + secondFlip);
        System.out.println("The average roll is " + (firstFlip + secondFlip) / 2);
    }

    public static void snakeEyes(Dice aDice, Dice anotherDice) {
        int count = 0;
        do {
            aDice.flip();
            anotherDice.flip();
            count = count + 1;
        } while (aDice.getReading() != 1 || anotherDice.getReading() != 1);
        System.out.println("You flipped " + count + " time(s) to get 'Snake Eyes'.");
    }
}
